<?php

class Admin extends Mysql {
	var $name;
	public function __construct() {
		parent::__construct();
	}
	/**
	 * 验证用户登录信息
	 * 2012-5-2 上午10:49:26
	 * Xewee.Zhiwei.Wang
	 */
	public function validLogin($userId, $password) {
		$sql = "select * from admin where userId = '$userId' and password = '$password'";
		$rows = $this->exec_query($sql);
		
		//验证通过
		if ($rows[0][0] && $rows[0][userId] == $userId && $rows[0][password] == $password) {
			return true;
		}
		else {
			return false;
		}
	}
	
}


?>